package com.aoxon.cargo.service;

import java.util.HashMap;

import com.aoxon.cargo.bean.GsonBean;

/**
 * 根据文本内容获取供应商列表的服务
 * @author ZZJ
 *
 */
public class SearchSupplierService extends MyService {

	/**
	 * 根据文本获取供应商列表
	 * 可选择按热门还是验证排序
	 * @param startIndex
	 * @param lenPurSearchSupplierService.javagth
	 * @param searchText
	 * @param fromHot
	 * @return
	 */
	public GsonBean execute(int startIndex, int length,
			String searchText, boolean fromHot) {

		if (fromHot) {
			url = "searchSupplierFromMarketHot" + suffix;;
		} else {
			url = "searchSupplierFromMarketCre" + suffix;;
		}
		params = new HashMap<String, String>();
		params.put("startIndex", String.valueOf(startIndex));
		params.put("length", String.valueOf(length));
		params.put("searchText", searchText);

		return doPost();
	}
	
}
